package systemModel

import (
	"CommonsProject/models/commonsModel"
)

// SysAuthority  系统权限
type SysAuthority struct {
	commonsModel.Model
	Url    string `form:"url" json:"url" gorm:"column:url;unique;comment:url"`
	Name   string `from:"name" json:"name" gorm:"column:name;comment:权限名"`
	Remark string `from:"remark" json:"remark" gorm:"column:remark;comment:备注"`

	//多对多关系
	SysRoles []*SysRole `json:"sysRoles" gorm:"many2many:sys_role_authority"`
}

func (a SysAuthority) TableName() string {
	return "sys_authority"
}
